/**
 * Ingenius-Group S.A.S
 *
 * Project: SAU
 * File: EditQuestionEvent.java
 * Date: 07/02/2011
 */

package com.ingenius.sau.client.event;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.ingenius.sau.client.event.EditQuestionEvent.EditQuestionEventHandler;

/**
 * Class <strong>EditQuestionEvent</strong>
 * 
 * @author Jesus David
 * @version 0.1
 */
public class EditQuestionEvent extends GwtEvent<EditQuestionEventHandler> {

	public interface EditQuestionEventHandler extends EventHandler {

		void onEditQuestion(EditQuestionEvent event);
	}

	public static Type<EditQuestionEventHandler> TYPE = new Type<EditQuestionEventHandler>();

	private final String questionId;

	public EditQuestionEvent(String questionId) {
		this.questionId = questionId;
	}

	public String getQuestionId() {
		return questionId;
	}

	@Override
	public Type<EditQuestionEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(EditQuestionEventHandler handler) {
		handler.onEditQuestion(this);
	}

}
